package com.whfc.common.file;

import com.whfc.common.file.impl.AliyunOssFileHandler;
import com.whfc.common.file.properties.FileProperties;

/**
 * 文件处理策略类
 *
 * @author qzexing
 * @version 1.0
 * @date 2021-03-02 10:32
 */
public class FileHandlerStrategy {

    public static FileHandler FileHandlerStrategy(FileProperties properties) {
        String type = properties.getType();
        switch (type) {
            default:
                //默认加载阿里云文件处理
                return new AliyunOssFileHandler(properties);
        }
    }

    public static void main(String[] args) {
        FileProperties properties = new FileProperties();
    }
}
